package com.earthchen.core.support.shiro.token;

import org.apache.shiro.authc.AuthenticationToken;

/**
 * 密码token
 */
public class PasswordToken implements AuthenticationToken {

    private static final long serialVersionUID = 1L;
    private String appId;
    private String password;

    public PasswordToken(String appId, String password) {
        this.appId = appId;
        this.password = password;

    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPassword() {
        return this.password;
    }

    @Override
    public Object getPrincipal() {
        return this.appId;
    }

    @Override
    public Object getCredentials() {
        return this.password;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }


}
